<link href='../../insumos/Scripts/styles.css' rel='stylesheet' type='text/css' />
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="texto">
  <tr>
    <td height="30" colspan="3" background="/insumos/img/fondo1.jpg" class="texto"><div align="right"><strong>PRODUCTO - Lista productos por debajo del m&iacute;nimo &nbsp;&nbsp;</strong></div></td>
  </tr>
</table>
<div align="center" class="texto"><br>
  <strong><? echo "Lista de Productos con Stock Menor al M&iacute;nimo Fijado.";?></strong><br>
 <br> <?
foreach($Rubro->find() as $rubro)
{
?>
</div>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="texto">
  <tr>
    <td height="30"><div align="left"><strong>&nbsp;<? echo "Rubro: ".$rubro->nombre; ?></strong></div>
    </td>
  </tr>
</table>

<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2" class="texto">
<tr>
	<td background="/insumos/img/fondo1.jpg"> 
    <div align="center"><strong><? echo "C&oacute;digo"; ?> </strong></div></td>
	<td background="/insumos/img/fondo1.jpg"> 
    <div align="center"><strong><? echo "Descripci&oacute;n"; ?> </strong></div></td>
	
	<td background="/insumos/img/fondo1.jpg"><div align="center"><strong><? echo "Stock"; ?> </strong></div></td>
	<td background="/insumos/img/fondo1.jpg"> <div align="center"><strong><? echo "Stock M&iacute;nimo"; ?> </strong></div></td>
</tr>
<?
foreach($Producto->find("rubro_id=$rubro->id") as $producto)
{	?> 
<tr>
  <td colspan="4">&nbsp;</td>
  </tr>
<tr> <?
	if($producto->stock<$producto->minimo_stock)
	{?>	<td><div align="center"><? echo $producto->id; ?> </div></td>		
		<td><div align="center"><? echo $producto->nombre; ?> </div></td>
		<td height="22"><div align="center"><? echo $producto->stock; ?> </div></td>
		<td><div align="center"><? echo $producto->minimo_stock; ?> </div></td>
	<? }?>
</tr>
<tr>
  <td height="2" colspan="4"><hr></td>
</tr>
<?
}?>
</table>
<br>
<? }
?>